import {init} from "snabbdom/src/package/init";
import {h} from "snabbdom/src/package/h";
// 1. hello world
//参数：数组、模块
//返回值：patch函数，作用对比两个vnode的差异一时半会儿
let patch = init([]);
let vnode = h('div#container.cls', 'Hello World');

let app = document.querySelector('#app');
let oldVnode = patch(app, vnode);
vnode = h('div', 'Hello Snabbdom');
patch(oldVnode, vnode);
// 2. div中放置子元素h1，p